import type { Page } from './page';
import type { Model } from './model';

/**
 * 应用主题设置
 */
export interface ThemeConfig {
  mode: 'light' | 'dark';
  primaryColor: string;
  secondaryColor?: string;
  successColor?: string;
  errorColor?: string;
  warningColor?: string;
  infoColor?: string;
  fontFamily?: string;
  fontSize?: number;
  borderRadius?: number;
}

/**
 * 应用导航配置
 */
export interface NavigationConfig {
  type: 'sidebar' | 'topbar' | 'both';
  logo?: string;
  title?: string;
  collapsed?: boolean;
  theme?: 'light' | 'dark';
  showBreadcrumb?: boolean;
}

/**
 * 代码生成配置
 */
export interface GenerationConfig {
  outputFormat: 'react' | 'vue' | 'angular';
  sanitizeCode: boolean; // 是否移除痕迹
  generateComments: boolean; // 是否生成注释
  packageManager: 'npm' | 'yarn' | 'pnpm';
  cssProcessor: 'css' | 'less' | 'scss' | 'styled-components' | 'emotion';
  typescript: boolean;
  stateManagement: 'redux' | 'mobx' | 'zustand' | 'context' | 'none';
}

/**
 * 应用配置
 */
export interface AppConfig {
  id: string;
  name: string;
  description?: string;
  version: string;
  author?: string;
  theme: ThemeConfig;
  navigation: NavigationConfig;
  generation?: GenerationConfig;
}

/**
 * 应用数据
 */
export interface AppData {
  pages: Record<string, Page>;
  models: Record<string, Model>;
  currentPageId: string;
  selectedComponentId?: string;
}

/**
 * 完整应用定义
 */
export interface App {
  config: AppConfig;
  data: AppData;
} 